package com.cosina.game.robodefence.core;

import com.cosina.game.robodefence.core.impl.BattleFieldImpl;
import com.cosina.game.robodefence.model.Commander;
import com.cosina.game.robodefence.model.GameStartConfig;
import com.cosina.game.robodefence.ui.MotionManager;

public class BattleEngine {
	
	public static BattleField field;
	public static Commander commander;
	public static SpeedManager speedManager;
	public static MotionManager motionManager;
	public static EnemyManager enemyManager;
	public static WaveManager waveManager;
	public static int mapId;
	
	public enum Status{
		before, prepare, running, pasuse, over; 
	}
	public static Status status;
	public static void init(){
		status = Status.running;
		BattleEngine.mapId = GameStartConfig.mapId;
		field = new BattleFieldImpl(mapId);
		waveManager = new WaveManager(mapId);
		commander = new Commander();
		speedManager = new SpeedManager();
		motionManager = new MotionManager();
		enemyManager = new EnemyManager();
	}
	
	public static void withTimeGoRoot() {
		motionManager.withTimeGo();
		enemyManager.withTimeGo();
	}
}
